package negocio.controlador;
// Generated 09/10/2011 20:58:01 by Hibernate Tools 3.2.0.CR1



import java.util.List;

import negocio.basica.Hashtag;
import dao.DAOConfiguracao;
import dao.DAOHashtag;
import dao.IDAOHashtag;



/**
* Interface Service da entidade Hashtag.
* @see negocio.controlador.Hashtag
* @author Thiago Ribeiro Tavares
*/

public class ControladorHashtag{
	private IDAOHashtag dao = null;
	private static ControladorHashtag singletonHashtagController = null;
	
	private ControladorHashtag(){
		dao = DAOHashtag.getInstance();
	}
	
	public static ControladorHashtag getInstance(){
		if(singletonHashtagController == null){
			singletonHashtagController = new ControladorHashtag();
		}
		return singletonHashtagController;
	}
	
	public void incluir(Hashtag pHashtag){
		dao.inserir(pHashtag);
	}
	
	public void alterar(Hashtag pHashtag){
		dao.alterar(pHashtag);
	}	
	
	public void excluir(Hashtag pHashtag){
		dao.excluir(pHashtag);
	}
	
	public Hashtag consultarPorChavePrimaria(int idHashtag){
		return dao.consultarPorChavePrimaria(idHashtag);
	}
	
	public List<Hashtag> listar(){
		return dao.listar();
	}
}

